---
title: Supabase
sidebarTitle: Supabase
---

This is the implementation of the Supabase data handler for MindsDB.

[Supabase](https://supabase.com/) is an open-source Firebase alternative.

## Prerequisites

Before proceeding, ensure the following prerequisites are met:

1. Install MindsDB [locally via Docker](https://docs.mindsdb.com/setup/self-hosted/docker) or use [MindsDB Cloud](https://cloud.mindsdb.com/).
2. To connect Supabase to MindsDB, install the required dependencies following [this instruction](/setup/self-hosted/docker#install-dependencies).
3. Install or ensure access to Supabase.

## Implementation

This handler is implemented by extending the PostgreSQL data handler.

The required arguments to establish a connection are as follows:

* `user` is the database user.
* `password` is the database password.
* `host` is the host name, IP address, or URL.
* `port` is the port used to make TCP/IP connection.
* `database` is the database name.

## Usage

In order to make use of this handler and connect to the Supabase server in MindsDB, the following syntax can be used:

```sql
CREATE DATABASE supabase_datasource
WITH ENGINE = 'supabase',
PARAMETERS = {
  "host": "127.0.0.1",
  "port": 54321,
  "database": "test",
  "user": "supabase",
  "password": "password"
};
```

You can use this established connection to query your database as follows:

```sql
SELECT *
FROM supabase_datasource.public.rentals
LIMIT 10;
```
